<?php if (!defined('THINK_PATH')) exit(); /*a:1:{s:79:"/webHome/host6366235/www/public/../application/admin/view/examtypes/update.html";i:1679839655;}*/ ?>
<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title><?php echo $setting['webname']; ?> - 专业管理</title>
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link href="/public/static/admin/layui/css/layui.css" rel="stylesheet">
    <link rel="shortcut icon" href="/public/static/favicon.ico"> <link href="/public/static/admin/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="/public/static/admin/css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="/public/static/admin/css/animate.css" rel="stylesheet">
    <link href="/public/static/admin/css/style.css?v=4.1.0" rel="stylesheet">
  <link href="/public/static/admin/css/plugins/iCheck/custom.css" rel="stylesheet">



</head>

<body class="gray-bg">
    <div class="row wrapper border-bottom white-bg page-heading">
        <div class="col-sm-4">
            <h2>专业管理</h2>
            <ol class="breadcrumb">
                <li>
                    <a href="<?php echo url('Admins/admin'); ?>">主页</a>
                </li>
                <li>
                    <strong>修改报考类别</strong>
                </li>
            </ol>
        </div>
    </div>
    <div class="wrapper wrapper-content animated fadeInRight">
        <div class="row">
             <div class="col-sm-12">
			 
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>修改报考类别</h5>
					</div>
                    <div class="ibox-content">
                        <form class="form-horizontal" id="form1">
						    
                           <div class="form-group">
                                <label class="col-sm-2 control-label">报考类别名称：</label>
                                <div class="col-sm-4">
                                    <input type="text" placeholder="报考类别名称" id="name" name="name" value="<?php echo $data['name']; ?>" class="form-control">
                                </div>
								<div class='col-sm-6'></div>
                           </div>
                            <div class="form-group">
                                <label class="col-sm-2 control-label">报考类别排序：</label>
                                <div class="col-sm-4">
                                    <input type="number" placeholder="报考类别排序" id="sort" name="sort"  value="<?php echo $data['sort']; ?>" class="form-control">
                                </div>
                                <div class='col-sm-6'><span style="color:#999;line-height: 30px;">升序排序</span></div>
                            </div>
                            <div class="form-group">
                              <label class="col-sm-2 control-label">报考类别状态：</label>
                              <div class="col-sm-4">
                                <div class="radio i-checks">
                                  <label style="padding-left:0px;"><input type="radio" name="status" value="1" class="status" checked>  可用</label>
                                  <label style="padding-left:0px;"><input type="radio" name="status" value="2" class="status">  不可用</label>
                                </div>
                              </div>
                              <div class='col-sm-6'></div>
                            </div>

                            <div class="form-group">
                                <div class="col-sm-offset-2 col-sm-9">
                                    <button class="btn btn-sm btn-info" type="button" id="adds">保 存</button>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
            </div>
		</div>
	</div>

    <!-- 全局js -->
    <script src="/public/static/admin/js/jquery.min.js?v=2.1.4"></script>
    <script src="/public/static/admin/js/bootstrap.min.js?v=3.3.6"></script>

    <!-- 自定义js -->
    <script src="/public/static/admin/js/content.js?v=1.0.0"></script>
    <script src="/public/static/admin/layui/layui.js"></script>
    <!--icheck-->
    <script src="/public/static/admin/js/plugins/iCheck/icheck.min.js"></script>
    <script>
        layui.use('upload', function() { //独立版的layer无需执行这一句
          var $ = layui.jquery, layer = layui.layer, upload = layui.upload; //独立版的layer无需执行这一句
          //点击提交
          $("#adds").click(function () {

            //一次性获取所有的表单元素的值
            var data = {}
            $("#form1").serializeArray().forEach(function(item){
               data[item.name] = item.value;
            })
            data['id'] = <?php echo $data['id']; ?>;
            //发送数据到保存按钮
            $.post("<?php echo url('Examtypes/edit'); ?>", data, function (data) {
              top.layer.msg(data.msg, {time: 2000, shade: 0.5}, function () {
                if (data.url) {
                  window.location.href = data.url;
                }
              });
            })
          });
        });

        //选中默认的状态
        $(".i-checks [value=<?php echo $data['status']; ?>]").prop("checked",true);

        $('.i-checks').iCheck({
          checkboxClass: 'icheckbox_square-green',
          radioClass: 'iradio_square-green',
        });

    </script>
    
    

</body>

</html>
